Integrand size = 21, antiderivative size = 187 \[ \int f^{a+c x^2} \sin \left (d+e x+f x^2\right ) \, dx=\frac {i e^{-i d-\frac {e^2}{4 i f-4 c \log (f)}} f^a \sqrt {\pi } \text {erf}\left (\frac {i e+2 x (i f-c \log (f))}{2 \sqrt {i f-c \log (f)}}\right )}{4 \sqrt {i f-c \log (f)}}-\frac {i e^{i d+\frac {e^2}{4 i f+4 c \log (f)}} f^a \sqrt {\pi } \text {erfi}\left (\frac {i e+2 x (i f+c \log (f))}{2 \sqrt {i f+c \log (f)}}\right )}{4 \sqrt {i f+c \log (f)}} \]
[Out]
Time = 0.46 (sec) , antiderivative size = 187, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {4560, 2325, 2266, 2236, 2235} \[ \int f^{a+c x^2} \sin \left (d+e x+f x^2\right ) \, dx=\frac {i \sqrt {\pi } f^a e^{-\frac {e^2}{-4 c \log (f)+4 i f}-i d} \text {erf}\left (\frac {2 x (-c \log (f)+i f)+i e}{2 \sqrt {-c \log (f)+i f}}\right )}{4 \sqrt {-c \log (f)+i f}}-\frac {i \sqrt {\pi } f^a e^{\frac {e^2}{4 c \log (f)+4 i f}+i d} \text {erfi}\left (\frac {2 x (c \log (f)+i f)+i e}{2 \sqrt {c \log (f)+i f}}\right )}{4 \sqrt {c \log (f)+i f}} \]
[In]
[Out]
Rule 2235
Rule 2236
Rule 2266
Rule 2325
Rule 4560
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {1}{2} i e^{-i d-i e x-i f x^2} f^{a+c x^2}-\frac {1}{2} i e^{i d+i e x+i f x^2} f^{a+c x^2}\right ) \, dx \\ & = \frac {1}{2} i \int e^{-i d-i e x-i f x^2} f^{a+c x^2} \, dx-\frac {1}{2} i \int e^{i d+i e x+i f x^2} f^{a+c x^2} \, dx \\ & = \frac {1}{2} i \int \exp \left (-i d-i e x+a \log (f)-x^2 (i f-c \log (f))\right ) \, dx-\frac {1}{2} i \int \exp \left (i d+i e x+a \log (f)+x^2 (i f+c \log (f))\right ) \, dx \\ & = \frac {1}{2} \left (i e^{-i d-\frac {e^2}{4 i f-4 c \log (f)}} f^a\right ) \int \exp \left (\frac {(-i e+2 x (-i f+c \log (f)))^2}{4 (-i f+c \log (f))}\right ) \, dx-\frac {1}{2} \left (i e^{i d+\frac {e^2}{4 i f+4 c \log (f)}} f^a\right ) \int \exp \left (\frac {(i e+2 x (i f+c \log (f)))^2}{4 (i f+c \log (f))}\right ) \, dx \\ & = \frac {i e^{-i d-\frac {e^2}{4 i f-4 c \log (f)}} f^a \sqrt {\pi } \text {erf}\left (\frac {i e+2 x (i f-c \log (f))}{2 \sqrt {i f-c \log (f)}}\right )}{4 \sqrt {i f-c \log (f)}}-\frac {i e^{i d+\frac {e^2}{4 i f+4 c \log (f)}} f^a \sqrt {\pi } \text {erfi}\left (\frac {i e+2 x (i f+c \log (f))}{2 \sqrt {i f+c \log (f)}}\right )}{4 \sqrt {i f+c \log (f)}} \\ \end{align*}
Time = 0.72 (sec) , antiderivative size = 216, normalized size of antiderivative = 1.16 \[ \int f^{a+c x^2} \sin \left (d+e x+f x^2\right ) \, dx=-\frac {(-1)^{3/4} e^{\frac {e^2}{4 i f+4 c \log (f)}} f^a \sqrt {\pi } \left (e^{\frac {i e^2 f}{2 \left (f^2+c^2 \log ^2(f)\right )}} \text {erfi}\left (\frac {(-1)^{3/4} (e+2 f x+2 i c x \log (f))}{2 \sqrt {f+i c \log (f)}}\right ) (f-i c \log (f)) \sqrt {f+i c \log (f)} (\cos (d)-i \sin (d))+\text {erfi}\left (\frac {\sqrt [4]{-1} (e+2 f x-2 i c x \log (f))}{2 \sqrt {f-i c \log (f)}}\right ) \sqrt {f-i c \log (f)} (-i f+c \log (f)) (\cos (d)+i \sin (d))\right )}{4 \left (f^2+c^2 \log ^2(f)\right )} \]
[In]
[Out]
Time = 0.43 (sec) , antiderivative size = 169, normalized size of antiderivative = 0.90
method | result | size |
risch | \(\frac {i \sqrt {\pi }\, f^{a} {\mathrm e}^{\frac {4 i d \ln \left (f \right ) c -4 d f +e^{2}}{4 i f +4 c \ln \left (f \right )}} \operatorname {erf}\left (-\sqrt {-c \ln \left (f \right )-i f}\, x +\frac {i e}{2 \sqrt {-c \ln \left (f \right )-i f}}\right )}{4 \sqrt {-c \ln \left (f \right )-i f}}+\frac {i \sqrt {\pi }\, f^{a} {\mathrm e}^{-\frac {4 i d \ln \left (f \right ) c +4 d f -e^{2}}{4 \left (c \ln \left (f \right )-i f \right )}} \operatorname {erf}\left (x \sqrt {i f -c \ln \left (f \right )}+\frac {i e}{2 \sqrt {i f -c \ln \left (f \right )}}\right )}{4 \sqrt {i f -c \ln \left (f \right )}}\) | \(169\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 299 vs. \(2 (135) = 270\).
Time = 0.26 (sec) , antiderivative size = 299, normalized size of antiderivative = 1.60 \[ \int f^{a+c x^2} \sin \left (d+e x+f x^2\right ) \, dx=\frac {\sqrt {\pi } {\left (i \, c \log \left (f\right ) + f\right )} \sqrt {-c \log \left (f\right ) - i \, f} \operatorname {erf}\left (\frac {{\left (2 \, c^{2} x \log \left (f\right )^{2} + 2 \, f^{2} x + i \, c e \log \left (f\right ) + e f\right )} \sqrt {-c \log \left (f\right ) - i \, f}}{2 \, {\left (c^{2} \log \left (f\right )^{2} + f^{2}\right )}}\right ) e^{\left (\frac {4 \, a c^{2} \log \left (f\right )^{3} + 4 i \, c^{2} d \log \left (f\right )^{2} - i \, e^{2} f + 4 i \, d f^{2} + {\left (c e^{2} + 4 \, a f^{2}\right )} \log \left (f\right )}{4 \, {\left (c^{2} \log \left (f\right )^{2} + f^{2}\right )}}\right )} + \sqrt {\pi } {\left (-i \, c \log \left (f\right ) + f\right )} \sqrt {-c \log \left (f\right ) + i \, f} \operatorname {erf}\left (\frac {{\left (2 \, c^{2} x \log \left (f\right )^{2} + 2 \, f^{2} x - i \, c e \log \left (f\right ) + e f\right )} \sqrt {-c \log \left (f\right ) + i \, f}}{2 \, {\left (c^{2} \log \left (f\right )^{2} + f^{2}\right )}}\right ) e^{\left (\frac {4 \, a c^{2} \log \left (f\right )^{3} - 4 i \, c^{2} d \log \left (f\right )^{2} + i \, e^{2} f - 4 i \, d f^{2} + {\left (c e^{2} + 4 \, a f^{2}\right )} \log \left (f\right )}{4 \, {\left (c^{2} \log \left (f\right )^{2} + f^{2}\right )}}\right )}}{4 \, {\left (c^{2} \log \left (f\right )^{2} + f^{2}\right )}} \]
[In]
[Out]
\[ \int f^{a+c x^2} \sin \left (d+e x+f x^2\right ) \, dx=\int f^{a + c x^{2}} \sin {\left (d + e x + f x^{2} \right )}\, dx \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 760 vs. \(2 (135) = 270\).
Time = 0.23 (sec) , antiderivative size = 760, normalized size of antiderivative = 4.06 \[ \int f^{a+c x^2} \sin \left (d+e x+f x^2\right ) \, dx=-\frac {\sqrt {\pi } \sqrt {2 \, c^{2} \log \left (f\right )^{2} + 2 \, f^{2}} {\left ({\left (f^{\frac {c e^{2}}{4 \, {\left (c^{2} \log \left (f\right )^{2} + f^{2}\right )}}} f^{a} \cos \left (\frac {4 \, c^{2} d \log \left (f\right )^{2} - e^{2} f + 4 \, d f^{2}}{4 \, {\left (c^{2} \log \left (f\right )^{2} + f^{2}\right )}}\right ) - i \, f^{\frac {c e^{2}}{4 \, {\left (c^{2} \log \left (f\right )^{2} + f^{2}\right )}}} f^{a} \sin \left (\frac {4 \, c^{2} d \log \left (f\right )^{2} - e^{2} f + 4 \, d f^{2}}{4 \, {\left (c^{2} \log \left (f\right )^{2} + f^{2}\right )}}\right )\right )} \operatorname {erf}\left (\frac {2 \, {\left (c \log \left (f\right ) - i \, f\right )} x - i \, e}{2 \, \sqrt {-c \log \left (f\right ) + i \, f}}\right ) + {\left (f^{\frac {c e^{2}}{4 \, {\left (c^{2} \log \left (f\right )^{2} + f^{2}\right )}}} f^{a} \cos \left (\frac {4 \, c^{2} d \log \left (f\right )^{2} - e^{2} f + 4 \, d f^{2}}{4 \, {\left (c^{2} \log \left (f\right )^{2} + f^{2}\right )}}\right ) + i \, f^{\frac {c e^{2}}{4 \, {\left (c^{2} \log \left (f\right )^{2} + f^{2}\right )}}} f^{a} \sin \left (\frac {4 \, c^{2} d \log \left (f\right )^{2} - e^{2} f + 4 \, d f^{2}}{4 \, {\left (c^{2} \log \left (f\right )^{2} + f^{2}\right )}}\right )\right )} \operatorname {erf}\left (\frac {2 \, {\left (c \log \left (f\right ) + i \, f\right )} x + i \, e}{2 \, \sqrt {-c \log \left (f\right ) - i \, f}}\right )\right )} \sqrt {c \log \left (f\right ) + \sqrt {c^{2} \log \left (f\right )^{2} + f^{2}}} + \sqrt {\pi } \sqrt {2 \, c^{2} \log \left (f\right )^{2} + 2 \, f^{2}} {\left ({\left (i \, f^{\frac {c e^{2}}{4 \, {\left (c^{2} \log \left (f\right )^{2} + f^{2}\right )}}} f^{a} \cos \left (\frac {4 \, c^{2} d \log \left (f\right )^{2} - e^{2} f + 4 \, d f^{2}}{4 \, {\left (c^{2} \log \left (f\right )^{2} + f^{2}\right )}}\right ) + f^{\frac {c e^{2}}{4 \, {\left (c^{2} \log \left (f\right )^{2} + f^{2}\right )}}} f^{a} \sin \left (\frac {4 \, c^{2} d \log \left (f\right )^{2} - e^{2} f + 4 \, d f^{2}}{4 \, {\left (c^{2} \log \left (f\right )^{2} + f^{2}\right )}}\right )\right )} \operatorname {erf}\left (\frac {2 \, {\left (c \log \left (f\right ) - i \, f\right )} x - i \, e}{2 \, \sqrt {-c \log \left (f\right ) + i \, f}}\right ) + {\left (-i \, f^{\frac {c e^{2}}{4 \, {\left (c^{2} \log \left (f\right )^{2} + f^{2}\right )}}} f^{a} \cos \left (\frac {4 \, c^{2} d \log \left (f\right )^{2} - e^{2} f + 4 \, d f^{2}}{4 \, {\left (c^{2} \log \left (f\right )^{2} + f^{2}\right )}}\right ) + f^{\frac {c e^{2}}{4 \, {\left (c^{2} \log \left (f\right )^{2} + f^{2}\right )}}} f^{a} \sin \left (\frac {4 \, c^{2} d \log \left (f\right )^{2} - e^{2} f + 4 \, d f^{2}}{4 \, {\left (c^{2} \log \left (f\right )^{2} + f^{2}\right )}}\right )\right )} \operatorname {erf}\left (\frac {2 \, {\left (c \log \left (f\right ) + i \, f\right )} x + i \, e}{2 \, \sqrt {-c \log \left (f\right ) - i \, f}}\right )\right )} \sqrt {-c \log \left (f\right ) + \sqrt {c^{2} \log \left (f\right )^{2} + f^{2}}}}{8 \, {\left (c^{2} \log \left (f\right )^{2} + f^{2}\right )}} \]
[In]
[Out]
\[ \int f^{a+c x^2} \sin \left (d+e x+f x^2\right ) \, dx=\int { f^{c x^{2} + a} \sin \left (f x^{2} + e x + d\right ) \,d x } \]
[In]
[Out]
Timed out. \[ \int f^{a+c x^2} \sin \left (d+e x+f x^2\right ) \, dx=\int f^{c\,x^2+a}\,\sin \left (f\,x^2+e\,x+d\right ) \,d x \]
[In]
[Out]